﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Workflows.Components.Entities.Distances
{
    public interface IAttributeDistanceCalcutor
    {
        /// <summary>
        /// load dictionary into memory or read config settings from file
        /// </summary>
        void InitInMemorySettings();

        /// <summary>
        /// return similarity score in [0,1]
        /// 0 indicate no similarity or null match
        /// 1 indicate perfect match
        /// </summary>
        /// <param name="attrValue1"></param>
        /// <param name="attrValue2"></param>
        /// <param name="result"></param>
        /// <returns></returns>
        double Compare(object attrValue1, object attrValue2, ref MatchResult result);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity1"></param>
        /// <param name="entity2"></param>
        /// <param name="attrMetaData"></param>
        /// <param name="result"></param>
        /// <returns></returns>
        double Compare(Entity entity1, Entity entity2,
            AttributeMetaData attrMetaData, ref MatchResult result);

        /// <summary>
        /// argument to bind attribute name
        /// </summary>
        string[] ArgumentNames { get; }

        Dictionary<string, string> ComparerSettings { get; set; }
    }
}
